﻿Option Explicit On
Option Strict On

''' <summary>
''' Clase para gestionar el empleado
''' </summary>
''' <autor_modificacion>AitorSalgado</autor_modificacion>
''' <fecha_Modificado>24/01/2012</fecha_Modificado>
''' <modificaciones>
''' 1.0 - Creada la clase
''' 
''' 
''' </modificaciones>
''' <fecha_creación>24/01/2012</fecha_creación>
''' <author>Aitor Salgado Molina</author>
''' 
Public Class Empleado
    
#Region "Atributos"
    Private _IdCodigo As Integer
    Private _Dni As String
    Private _Nombre As String
    Private _Apellido As String
    Private _SegundoApellido As String
    Private _Telefono As String
#End Region

#Region "constructor y destructor"

    Public Sub New()
        _IdCodigo = 0
        _Dni = ""
        _Nombre = ""
        _Apellido = ""
        _SegundoApellido = ""
        _Telefono = ""
    End Sub

    Public Sub New(ByVal _NuevoDNI As String, ByVal _NuevoNombre As String, ByVal _NuevoApellido As String, ByVal _SegundoApellido As String, ByVal _Telefono As String)
        _IdCodigo = 0
        _Dni = _NuevoDNI
        _Nombre = _NuevoNombre
        _Apellido = _NuevoApellido
        _SegundoApellido = _SegundoApellido
        _Telefono = _Telefono
    End Sub


    Public Sub New(ByVal copyEmpleado As Empleado)
        With copyEmpleado
            _Dni = .Dni
            _Nombre = .Nombre
            _Apellido = .Apellido
        End With
    End Sub

    Public Sub Dispose()
        _Dni = ""
        _Nombre = ""
        _Apellido = ""
    End Sub

    Protected Overrides Sub Finalize()
        _Dni = ""
        _Nombre = ""
        _Apellido = ""
    End Sub

#End Region

#Region "Propiedades"

    Public Property Dni() As String
        Get
            Return _Dni
        End Get
        Set(ByVal value As String)
            _Dni = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Apellido() As String
        Get
            Return _Apellido
        End Get
        Set(ByVal value As String)
            _Apellido = value
        End Set
    End Property


    Public Property SegundoApellido() As String
        Get
            Return _SegundoApellido
        End Get
        Set(ByVal value As String)
            _SegundoApellido = value
        End Set
    End Property

    Public Property Telefono() As String
        Get
            Return _Telefono
        End Get
        Set(ByVal value As String)
            _Telefono = value
        End Set
    End Property

    Public Property IdEmpleado() As Integer
        Get
            Return _IdCodigo
        End Get
        Set(ByVal value As Integer)
            _IdCodigo = value
        End Set
    End Property

#End Region

#Region "Metodos publicos"

#End Region

#Region "Metodos privados"

#End Region

End Class
